package com.ruoyi.StarStudio.Entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.sql.Timestamp;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/*
    兑换记录实体类
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Exchange {

    @Excel(name = "兑换记录ID")
    private long exchange_id; //兑换记录ID
    @Excel(name = "订单ID")
    private long order_id; //订单ID
    @Excel(name = "对应的用户ID")
    private long exchange_user_id; //对应的用户ID
    @Excel(name = "商品个体ID")
    private long goods_item_id; //实体商品个体ID
    @Excel(name = "优惠券个体ID")
    private long coupons_item_id; //优惠券个体ID
    @Excel(name = "兑换记录状态（已使用/已兑换未使用/已过期）")
    private String exchange_status; //兑换记录状态（已使用/已兑换未使用/已过期）
    @Excel(name = "核销商家名称")
    private String exchange_store; //核销商家（核销后显示核销商家名称）
    @Excel(name = "使用时间")
    private Timestamp use_time; //使用时间

    private Map<String,Object> params; //请求参数

    public Map<String, Object> getParams() {
        if (params == null) {
            params = new HashMap<>();
        }
        return params;
    }

    public void setParams(Map<String, Object> params) {
        this.params = params;
    }
}
